package com.czc.cca.ddl;

import org.zoomdev.zoom.dao.ddl.*;
import org.zoomdev.zoom.dao.driver.mysql.MysqlDriver;

@_DDL_Table(name = "t_mer_withdraw", simpleName = "", engine = MysqlDriver.InnoDB, comment = "提现记录表")
public class _DDL_MerWithdraw {

    @_DDL_Primary()
    @_DDL_Column(name = "id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "主键ID")
    private java.math.BigInteger id;

    @_DDL_Column(name = "date", type = SqlType.INT_UNSIGNED, nullable = false, comment = "提现日期")
    private Long date;

    @_DDL_Column(name = "ag_id", type = SqlType.INT_UNSIGNED, nullable = false, comment = "agid")
    private Long agId;

    @_DDL_Index(name = "IDX_t_mer_withdraw_mer_id")
    @_DDL_Column(name = "mer_id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "商户ID")
    private java.math.BigInteger merId;

    @_DDL_Column(name = "amt", type = SqlType.DECIMAL, size = 15, scale = 2, nullable = false, comment = "提现金额")
    private java.math.BigDecimal amt;

    @_DDL_Index(name = "IDX_t_mer_withdraw_state")
    @_DDL_Column(name = "state", type = SqlType.BOOLEAN, nullable = false, comment = "状态：0-处理中，1-成功，2-失败 3-超时 4-未知")
    private Boolean state;

    @_DDL_Index(name = "IDX_t_mer_withdraw_ch_mer_id")
    @_DDL_Column(name = "ch_mer_id", type = SqlType.BIGINT_UNSIGNED, nullable = false, comment = "渠道商户id")
    private java.math.BigInteger chMerId;

    @_DDL_Column(name = "ch_type", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "提现渠道")
    private Integer chType;

    @_DDL_Column(name = "ch_ord_id", type = SqlType.VARCHAR, size = 32, comment = "第三方渠道订单id")
    private String chOrdId;

    @_DDL_Column(name = "ch_trans_time", type = SqlType.DATETIME, comment = "第三方渠道交易时间")
    private java.time.LocalDateTime chTransTime;

    @_DDL_Column(name = "trans_seq", type = SqlType.VARCHAR, size = 32, comment = "本地发起的流水")
    private String transSeq;

    @_DDL_Column(name = "ord_no", type = SqlType.VARCHAR, size = 32, nullable = false, comment = "商户提现订单号")
    private String ordNo;

    @_DDL_Column(name = "type", type = SqlType.TINYINT_UNSIGNED, nullable = false, comment = "提现类型 0: 系统自动提现 1 手动提现")
    private Integer type;

    @_DDL_Column(name = "cr_time", type = SqlType.DATETIME, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP, comment = "创建时间")
    private java.time.LocalDateTime crTime;

    @_DDL_Column(name = "up_time", type = SqlType.DATETIME, defaultFunction = MysqlDriver.CURRENT_TIMESTAMP_ON_UPDATE, comment = "更新时间")
    private java.time.LocalDateTime upTime;

    @_DDL_Column(name = "err_msg", type = SqlType.VARCHAR, size = 255, comment = "错误信息")
    private String errMsg;

    @_DDL_Column(name = "err_code", type = SqlType.VARCHAR, size = 20, comment = "失败代码")
    private String errCode;

}
